using System;
using System.Drawing;
using System.Reflection;
using System.Resources;
using System.Windows.Forms;
using CnSharp.Localization;
using CnSharp.SSMS.AddIn.Util;

namespace CnSharp.SSMS.Demo
{
    internal class Common
    {
        public const string DbProviderFactory = "System.Data.SqlClient";

        public const string ProductShortName = "SQL Sharp Demo";
      
        public const string ProcessName = "ssms";
        public static Color SuccessColor = Color.DarkGreen;
        public static Color ErrorColor = Color.Red;

        public static string AppRoot = Paths.AddinRoot;  //Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase).Replace("file:\\", "") + "\\";

        public static string SsmsDir = Application.StartupPath;



        public static DialogResult ShowErrorMessageBox(string message)
        {
            return MessageBox.Show(message, ProductShortName, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static DialogResult ShowWarningMessageBox(string message)
        {
            return MessageBox.Show(message, ProductShortName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }

        public static DialogResult ShowInfoMessageBox(string message)
        {
            return MessageBox.Show(message, ProductShortName, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

    }

    public enum ObjectGroup
    {
        Database,
        Table,
        View,
        Procedure
    }

    public enum CodeGenerationGroup
    {
        Table,
        View,
        Procedure
    }
}